package top.hcode.hoj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.hcode.hoj.pojo.entity.coll.CollUserAnswer;

import java.util.List;

/**
 * @author orangej
 * @since 2025-02-09
 */
@Mapper
@Repository
public interface CollUserAnswerMapper extends BaseMapper<CollUserAnswer> {

    @Select("select question_id from coll_user_answer where user_id = #{uid} and coll_id = #{collId}")
    List<String> queryAnsweredQuestionIds(@Param("uid") String uid, @Param("collId") String collId);
}
